//
//  BookDBManager.h
//  readNovels
//
//  Created by wulanzhou on 2017/2/27.
//  Copyright © 2017年 wulanzhou. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface BookDBManager : NSObject

+ (BookDBManager *)shareInstance;

//创建数据库
- (BOOL)createDBWithName:(NSString *)name;
- (BOOL)createDBWithName:(NSString *)name tableSqlArray:(NSArray *)sqlTables;

//执行创建、删除、新增、更新数据库操作
- (BOOL)updataDBWithSql:(NSString *)sql, ...NS_REQUIRES_NIL_TERMINATION;

//事物操作
- (BOOL)transactionUpdataDBWithSqlArray:(NSArray *)sqlArray arguments:(NSArray *)args;

//查询
- (NSArray *)queryDBWithSql:(NSString *)sql, ...NS_REQUIRES_NIL_TERMINATION;
- (NSArray *)queryDBWithModels:(Class)cls sql: (NSString *)sql, ...NS_REQUIRES_NIL_TERMINATION;

@end
